
Partial Class Secure_WebAdmin_MembershipManager
    Inherits baseWebPage

    Protected Sub Page_PreInit(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreInit
        If Not User.IsInRole("WebAdmins") Then
            Response.Redirect("Default.aspx")
        End If
    End Sub

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Page.IsPostBack Then
            Exit Sub
        End If
        Dim pageIndex As String = Request.QueryString("page")
        If String.IsNullOrEmpty(pageIndex) Then
            Exit Sub
        End If
        Try
            dgMembers.PageIndex = CInt(pageIndex)
        Catch ex As Exception
            Exit Sub
        End Try
    End Sub

    Protected Sub dgMembers_RowCommand(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs) Handles dgMembers.RowCommand
        If e.CommandName = "MembershipDetail" Then
            MyBase.SetPreviousPage("page=" & dgMembers.PageIndex)
            Session("core_UserName") = e.CommandArgument
            Response.Redirect("MembershipDetails.aspx")
        End If
    End Sub
End Class
